<template>
	<view class="pcontent">
		<view class="tp">
			<image src="../../static/imgs/logo_bbl2.png" style="width: 400rpx;" mode="widthFix"></image>
		</view>
		<view class="main">
			<view class="pitems">
				<view v-for="(item, index) in list" class="pitem" @click="onClick(item)" v-text="item.label"></view>
			</view>
		</view>
	</view>
</template>

<script>
	import { get_home_info } from '../../request/index.js';
	export default {
		data() {
			return {
				list : [
					{label : '锐胜', type : 'desk', id : 'e8a8a5c3-fa29-5580-a3d5-4c0d1cce02d6'},
					{label : '星爵', type : 'desk', id : '3c2c9146-abf5-539a-b735-2dcc7c1d2a21'},
					{label : '绅迪', type : 'desk', id : '56544115-ac01-5b58-a315-177a7e742646'},
					{label : '奥得威', type : 'desk', id : '921b595d-ae0b-51b7-8f3e-b8b974b69bc3'},
					{label : '球杆', type : 'club', id : ''},
					{label : '配件', type : 'part', id : ''}
				]
			}
		},
		onShow() {
			
		},
		methods: {
			onClick (item) {
				if(item.type === 'desk'){
					uni.navigateTo({
						url:"/pages/desk/desk?brandId=" + item.id + "&brandName=" + item.label
					});
				} else if(item.type === 'part'){
					uni.navigateTo({
						url:"/pages/part/part?_v=" + Date.now()
					});
				}else if(item.type === 'club') {
					uni.navigateTo({
						url:"/pages/club/club?_v=" + Date.now()
					});
				}
				
			}
		}
	}
</script>

<style>
page{
	background-color: #000;
	background-image: url('https://yz.bbl147.cn/template/bg.jpg');
	background-size: 100% auto;
}

.pcontent{
	
}

.pcontent .tp{
	text-align: center;
	padding: 100rpx 0;
}

.pcontent .tp .tpt{
	font-size: 25px;
	color: #FFF;
	font-weight: bold;
}

.pcontent .main{
	padding: 0 105rpx;
}

.pcontent .main .pitems{
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
}

.pcontent .main .pitems .pitem{
	border-radius: 4px;
	line-height: 120rpx;
	height: 120rpx;
	text-align: center;
	color: #cb9e70;
	border: 1px solid #cb9e70;
	border-radius: 4px;
	width: 238rpx;
	margin-bottom: 49rpx;
}
</style>
